package com.ycfmedical.bed.greendao.gen;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.ycfmedical.bed.local.entity.BillRecords;
import com.ycfmedical.bed.local.entity.HisNurseRecordsMsg;
import com.ycfmedical.bed.local.entity.HisSystemInfo;
import com.ycfmedical.bed.local.entity.PhysicianChargeMsg;
import com.ycfmedical.bed.local.entity.StaffInfo;
import com.ycfmedical.bed.local.entity.TimerControl;
import com.ycfmedical.bed.local.entity.User;

import com.ycfmedical.bed.greendao.gen.BillRecordsDao;
import com.ycfmedical.bed.greendao.gen.HisNurseRecordsMsgDao;
import com.ycfmedical.bed.greendao.gen.HisSystemInfoDao;
import com.ycfmedical.bed.greendao.gen.PhysicianChargeMsgDao;
import com.ycfmedical.bed.greendao.gen.StaffInfoDao;
import com.ycfmedical.bed.greendao.gen.TimerControlDao;
import com.ycfmedical.bed.greendao.gen.UserDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig billRecordsDaoConfig;
    private final DaoConfig hisNurseRecordsMsgDaoConfig;
    private final DaoConfig hisSystemInfoDaoConfig;
    private final DaoConfig physicianChargeMsgDaoConfig;
    private final DaoConfig staffInfoDaoConfig;
    private final DaoConfig timerControlDaoConfig;
    private final DaoConfig userDaoConfig;

    private final BillRecordsDao billRecordsDao;
    private final HisNurseRecordsMsgDao hisNurseRecordsMsgDao;
    private final HisSystemInfoDao hisSystemInfoDao;
    private final PhysicianChargeMsgDao physicianChargeMsgDao;
    private final StaffInfoDao staffInfoDao;
    private final TimerControlDao timerControlDao;
    private final UserDao userDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        billRecordsDaoConfig = daoConfigMap.get(BillRecordsDao.class).clone();
        billRecordsDaoConfig.initIdentityScope(type);

        hisNurseRecordsMsgDaoConfig = daoConfigMap.get(HisNurseRecordsMsgDao.class).clone();
        hisNurseRecordsMsgDaoConfig.initIdentityScope(type);

        hisSystemInfoDaoConfig = daoConfigMap.get(HisSystemInfoDao.class).clone();
        hisSystemInfoDaoConfig.initIdentityScope(type);

        physicianChargeMsgDaoConfig = daoConfigMap.get(PhysicianChargeMsgDao.class).clone();
        physicianChargeMsgDaoConfig.initIdentityScope(type);

        staffInfoDaoConfig = daoConfigMap.get(StaffInfoDao.class).clone();
        staffInfoDaoConfig.initIdentityScope(type);

        timerControlDaoConfig = daoConfigMap.get(TimerControlDao.class).clone();
        timerControlDaoConfig.initIdentityScope(type);

        userDaoConfig = daoConfigMap.get(UserDao.class).clone();
        userDaoConfig.initIdentityScope(type);

        billRecordsDao = new BillRecordsDao(billRecordsDaoConfig, this);
        hisNurseRecordsMsgDao = new HisNurseRecordsMsgDao(hisNurseRecordsMsgDaoConfig, this);
        hisSystemInfoDao = new HisSystemInfoDao(hisSystemInfoDaoConfig, this);
        physicianChargeMsgDao = new PhysicianChargeMsgDao(physicianChargeMsgDaoConfig, this);
        staffInfoDao = new StaffInfoDao(staffInfoDaoConfig, this);
        timerControlDao = new TimerControlDao(timerControlDaoConfig, this);
        userDao = new UserDao(userDaoConfig, this);

        registerDao(BillRecords.class, billRecordsDao);
        registerDao(HisNurseRecordsMsg.class, hisNurseRecordsMsgDao);
        registerDao(HisSystemInfo.class, hisSystemInfoDao);
        registerDao(PhysicianChargeMsg.class, physicianChargeMsgDao);
        registerDao(StaffInfo.class, staffInfoDao);
        registerDao(TimerControl.class, timerControlDao);
        registerDao(User.class, userDao);
    }
    
    public void clear() {
        billRecordsDaoConfig.clearIdentityScope();
        hisNurseRecordsMsgDaoConfig.clearIdentityScope();
        hisSystemInfoDaoConfig.clearIdentityScope();
        physicianChargeMsgDaoConfig.clearIdentityScope();
        staffInfoDaoConfig.clearIdentityScope();
        timerControlDaoConfig.clearIdentityScope();
        userDaoConfig.clearIdentityScope();
    }

    public BillRecordsDao getBillRecordsDao() {
        return billRecordsDao;
    }

    public HisNurseRecordsMsgDao getHisNurseRecordsMsgDao() {
        return hisNurseRecordsMsgDao;
    }

    public HisSystemInfoDao getHisSystemInfoDao() {
        return hisSystemInfoDao;
    }

    public PhysicianChargeMsgDao getPhysicianChargeMsgDao() {
        return physicianChargeMsgDao;
    }

    public StaffInfoDao getStaffInfoDao() {
        return staffInfoDao;
    }

    public TimerControlDao getTimerControlDao() {
        return timerControlDao;
    }

    public UserDao getUserDao() {
        return userDao;
    }

}
